Preparing 3D assets in third-party tools
As you prepare 3D assets for your Kanzi Studio project, keep in mind:
- Remove the unnecessary vertex attributes from meshes. The smaller the vertex size, the more efficient is the access to the vertex data. You can remove unnecessary vertex attributes in most 3D modeling software during export. The export settings usually include a list of vertex attributes that are exported, such as normals, vertex colors and so on. Remove the unnecessary attributes.
-
When importing .fbx files Kanzi Studio automatically copies and turns to textures all textures you assigned into the diffuse-slot.
- It is best if you keep single objects in the center, and choose a sensible place for the pivot. For example, for a chair, set the pivot to the point where the chair touches the ground.
Poorly placed pivots are a problem because after you bring an object to Kanzi and add it to a hierarchy or animate it, it is very likely the object will not behave an expected way. Additionally, the accuracy of the vertex buffer of the object is too low when the pivot is far away from the imported object. In Kanzi Studio objects with this problem appear like they are in low-resolution.
- If you do not assign a material, Kanzi Studio assigns the material that you set as the default material in your project. If you do assign a default material and the material value for the imported 3D content is invalid, Kanzi Studio uses a bright-green debug material. To avoid this, assign the material to all 3D models before exporting from your third-party tool. To correct the problem, assign a material in Kanzi Studio. See Using materials.
- When importing, Kanzi Studio supports only the Blinn-Phong lighting model. Before exporting 3D assets in your 3D modeling tool, choose Blinn-Phong material (the shininess value is > 1).
- Use only one material per mesh. This way your meshes perform better, are simpler to manage, and when you need to optimize them, you do not always have to redo and re-import the original content.
- Use as few materials as possible.
- Combine meshes that use the same material into one mesh whenever you can.
-
Kanzi Studio imports only lights it supports, including simple point lights, directional lights, and spot lights. Instead of skylights, physical lights, area light, and Vray lights Kanzi Studio creates an Empty Node for each.
- When making movable transparent parts like, for example, cars with movable doors and transparent windows, create them as separate objects. To do this in Kanzi, you have to either use sorting filters, or create a separate render pass for the windows to render correctly. See Using sorting filters.
- If you want to make invisible seams when two movable parts are close together (for example, when a car door is closed), in your third-party tool edit normals and combine the seam normals to point to the same direction. This makes the reflection look smooth on seams.
- The orientation of the coordinate system used by your 3D modeling tool can differ from that used by Kanzi Studio, which can change the orientation of your assets as you import them to Kanzi Studio. You can change the orientation of your assets either in your modeling tool, or in Kanzi Studio. To change the orientation of your 3D assets in Kanzi Studio:
- In the Library > Resource Files > 3D Assets select the model.
- In the Properties set the Import Axis Transform property to the value that represents the difference between the orientation of the coordinate systems.
- In the Library > Resource Files > 3D Assets right-click your model and select Clean Import 3D Asset File.
- It is easier to create very simple animations in Kanzi Studio using the Kanzi animation tools and transitions in state managers, than it is to import them from a third-party tool. If you are creating complex animations that, for example, contain hierarchies, create them in third-party tools and import them to Kanzi Studio.
-
When you have complex content in animation controllers or controller stacks, bake the animation already in your third-party tool or before exporting. Centering pivots and setting empty animation controller (zero out the animations with Freeze Transform tool) to start the animation from 0 keeps the data clean.
- Bone count and amount of bones that can affect single vertex are restricted by the shader that handles the skinning. If your skinned mesh misbehaves in Kanzi Studio, check the Log window for warnings and try simplifying it. Note that currently you can use in a Kanzi Studio project only one instance of skinned mesh.
- If after importing your 3D assets to Kanzi Studio the assets do not look the way they should, before trying to fix anything, try exporting the assets to another format supported by Kanzi Studio. For example, if you have exported to .dae and that does not work, try .fbx instead. See Importing.
- When you encounter flipped meshes, polygons, normals, or texture coordinates in after importing 3D assets to Kanzi Studio, it is best to fix these problems in your third-party tool. However, if you cannot find the problem in your third-party tool, you can fix these problems in Kanzi Studio. To flip meshes, polygons, normals, or texture coordinates in Kanzi Studio, in the Project right-click the imported 3D model and select Flip and then the type of content you want to flip.
-
When using complex hierarchy, create a script in your third-party tool to save the parent properties of all nodes and unlink them before using the Reset X-Form tool for everything, and then link back and save and reapply the rotations.
Preparing 3D assets in 3ds Max
As you prepare 3D assets for your Kanzi Studio project in 3ds Max, keep in mind:
- To avoid problems with scale, set units to meters. One unit in Kanzi equals one meter in 3ds Max. See Adjusting the scale of imported 3D assets.
- If you set align up vectors, you can export your 3D models either y axis up or z axis up, and Kanzi Studio corrects the rotation.
- Adjusting pivots in 3ds Max has the same effect in Kanzi Studio.
- Highly fragmented meshes, meshes that contain a lot of clusters, and use several textures or materials, negatively affect the performance of your Kanzi application by causing textures and shader switches, and sometimes can cause more batches to be rendered. This is most likely the cause of unwanted effects in a scene in your Kanzi Studio project.
- Avoid using offset and non-uniform scaling at least when you have a hierarchy. Because 3ds Max allows you to link objects into a hierarchy even when objects have non-uniform scale. This allows you to have the same effect on the hierarchy regardless of the stage when you added the objects, scaled or not scaled. That information is lost in the process and you cannot reconstruct it through resetting. If you need to use non-uniform scale, do so only on the mesh level.
- Weld all vertices with very small amount to make sure there are no unwelded vertices causing shading errors and extra vertices.
- Remove dead vertices. You can find double meshes by selecting one vertex using rectangle selection and checking that the selection says number of the vertex instead of the count of the vertices. If it says there are two or more vertices selected and they seem to be in the same place you most likely have overlapping meshes. In some cases Weld Selected will not fix that, because if you are using editable poly class object the object itself has more rules for the topology and merging vertices is not applicable to certain cases.
- UV splits and smoothing groups create double vertices. Having hard edges is not always the best, but if you have a UV split, you can use smoothing group hard edge in the same place without any additional penalty.
- If default orientation used in 3ds Max is not correct, to achieve better shading for low polygon models, use Edit polygons > Turn.
- Avoid using inverse scales or Mirror tool on objects to avoid inverse matrices. Mirror tool creates content that is correct for offline rendering, but invalid matrices for realtime rendering. Try fixing inverse matrices:
- Remove the object from a hierarchy and use Reset X-Form tool on it.
- Reapply the recent orientation.
- Add the object back to the hierarchy.
- Use Reset X-Forms tool before exporting to ensure there are no unwanted scaling or flipped faces. Note that when you have objects in a hierarchy (schematic view in 3ds Max) using Reset X-Forms tool in the parent object rotates the child objects too, which you cannot undo in 3ds Max. To avoid this, either use Reset X-Forms tool before creating a hierarchy, or break it for the moment you reset them. You can solve this using a MAXScript, but as max default this is the case. This is an issue in at least 3ds Max 5 and 3ds Max 2010.
Preparing 3D assets in Maya
As you prepare 3D assets for your Kanzi Studio project in Maya, keep in mind:
- Even small differences between viewport aspect ratios, camera aspect ratios, and resolutions can cause strange effects to layouts.
See also
Best practices
Importing 3D assets
Merging 3D assets
Importing
Open topic with navigation